package tools;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;

import entitybean.oc_voyage_pla.EnitityBeanOc_Voyage_Pla;;

public class InterfaceVoyagePlaList {
	public List<EnitityBeanOc_Voyage_Pla> ViewOc_News(ResultSet rs)
	{
		
		List<EnitityBeanOc_Voyage_Pla> list =new ArrayList<EnitityBeanOc_Voyage_Pla>();
		try {
			Integer i=1;
			while(rs.next())
			{
				
				EnitityBeanOc_Voyage_Pla view=new EnitityBeanOc_Voyage_Pla();
				view.setOc_boatname(rs.getString("oc_boatname"));
				view.setBoatid(Integer.valueOf(rs.getString("boatid")));
				view.setVoyage_name(rs.getString("voyage_name"));
				view.setId(Integer.valueOf(rs.getString("id")));
				list.add(view);
				i=i+1;
			}
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return list;
		
	}
}
